Skip to content

fix(ui): correct file:disabled variant order so the dev server compiles#1026

Merged
BigSimmo merged 6 commits into
mainfrom
claude/patient-safety-plan-mockup-wldmyc
Jul 21, 2026
Merged

fix(ui): correct file:disabled variant order so the dev server compiles#1026
BigSimmo merged 6 commits into
mainfrom
claude/patient-safety-plan-mockup-wldmyc

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • The guideline-PDF file input in DocumentManagerPanel used file:disabled:opacity-50. Tailwind expands that to ::file-selector-button:disabled — a pseudo-class after a pseudo-element, which is invalid CSS (only user-action pseudo-classes like :hover/:active/:focus are allowed there).
  • Next 16's Turbopack CSS parser rejects the generated rule and fails to compile globals.css, which 500-ed every route under npm run dev / npm run ensure / npm run verify:ui. (The production Lightning CSS build tolerated it, so deploys and the Build CI job were unaffected — this was dev/UI-verification only.)
  • Fix: reorder to disabled:file:opacity-50, which generates the valid :disabled::file-selector-button (pseudo-class before pseudo-element) and preserves the intent — dim the file-picker button while the input is disabled.

One-line change:

- ... file:hover:bg-[color:var(--surface-subtle)] file:disabled:opacity-50"
+ ... file:hover:bg-[color:var(--surface-subtle)] disabled:file:opacity-50"

Verification

  • npm run dev now compiles — Ready in 2.6s (previously hung / 500-ed on the CSS parse error)
  • /, /mockups/patient-safety-plan, and /api/local-project-id all return HTTP 200, no Parsing CSS source code failed in the dev log
  • Lint (changed file) — clean
  • Typecheck (tsc --noEmit) — clean
  • Not applicable (no retrieval/answer/clinical-workflow behaviour changed): eval:*, check:production-readiness

Risk and rollout

  • Risk: minimal — a single Tailwind variant reorder on one file input's disabled styling. No behaviour, logic, ingestion, or access change; the disabled-state dimming renders identically, now via a valid selector.
  • Rollback: revert the one-line change.
  • Provider or production effects: None. Production CSS output is unchanged in effect (the production build already tolerated the old class).

Clinical Governance Preflight

CSS-only styling fix on an existing control; no ingestion, answer generation, retrieval/ranking, source rendering, document-access, privacy, production-env, or clinical-output behaviour is touched — all items below hold unchanged.

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

Notes

  • Discovered while trying to run the app for UI verification of an earlier mockup PR; the dev server couldn't boot because of this rule. This unblocks local npm run dev / verify:ui for everyone on the Next 16 + Tailwind v4 setup.

🤖 Generated with Claude Code

https://claude.ai/code/session_019g9m5emoPKCmDDPeGrchYd


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved the visual styling of disabled PDF upload controls for more consistent, clearer feedback.

… globals.css

The file input in DocumentManagerPanel used `file:disabled:opacity-50`, which
Tailwind expands to `::file-selector-button:disabled` — a pseudo-class after a
pseudo-element. Only user-action pseudo-classes (:hover/:active/:focus) are
valid there, so Next 16's Turbopack CSS parser rejects the generated rule and
fails to compile globals.css, 500-ing every route in `npm run dev` /
`npm run ensure` / `verify:ui` (the production Lightning CSS build tolerated it,
so deploys were unaffected).

Reorder to `disabled:file:opacity-50`, which generates the valid
`:disabled::file-selector-button` (pseudo-class before pseudo-element) and keeps
the intent: dim the file-picker button while the input is disabled.

Verified: `npm run dev` now compiles (Ready in 2.6s); `/`, the documents/upload
surface, and other routes return 200 with no CSS parse error.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019g9m5emoPKCmDDPeGrchYd
@supabase

supabase Bot commented Jul 21, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 26bc1b7a-7bd0-467a-aad3-9c815c9762f6

📥 Commits

Reviewing files that changed from the base of the PR and between fbe6402 and 84f2b6b.

📒 Files selected for processing (1)
  • src/components/clinical-dashboard/DocumentManagerPanel.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/clinical-dashboard/DocumentManagerPanel.tsx

📝 Walkthrough

Walkthrough

The PDF upload input’s Tailwind disabled-opacity class variant order was updated in UploadPanel.

Changes

Upload input styling

Layer / File(s) Summary
Disabled file opacity class
src/components/clinical-dashboard/DocumentManagerPanel.tsx
The PDF file input changes from file:disabled:opacity-50 to disabled:file:opacity-50.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the one-line Tailwind variant reorder and dev-server compile fix.
Description check ✅ Passed The description follows the template and includes summary, verification, risk, and clinical governance sections.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/patient-safety-plan-mockup-wldmyc

Comment @coderabbitai help to get the list of available commands.

@BigSimmo
BigSimmo marked this pull request as ready for review July 21, 2026 01:08
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@BigSimmo
BigSimmo enabled auto-merge (squash) July 21, 2026 01:10
@BigSimmo
BigSimmo merged commit ecaa73d into main Jul 21, 2026
17 checks passed
@BigSimmo
BigSimmo deleted the claude/patient-safety-plan-mockup-wldmyc branch July 21, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants